﻿using FTBS.Models.DAO;
using FTBS.Models.Entities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace FTBS.Models.BLO
{
    public class RoomBLO
    {
        private RoomDAO _roomDao = new RoomDAO();

        /// <summary>
        /// Get all room
        /// </summary>
        /// <returns>List of room</returns>
        /// <author>vuongvt</author>
        public IEnumerable<Room> GetListRoom()
        {
            return _roomDao.GetListRoom();
        }

        /// <summary>
        /// Get list room by theaterId. It is used when choose a theater -> load all room of this theater
        /// </summary>
        /// <param name="theaterId">TheaterId</param>
        /// <returns>SelectList of Room</returns>
        /// <author>vuongvt</author>
        public SelectList GetSelectedListRoomByTheater(int theaterId)
        {
            return _roomDao.GetSelectedListRoomByTheater(theaterId);
        }

        /// <summary>
        /// Get list room by theaterId
        /// </summary>
        /// <param name="theaterId"></param>
        /// <returns>List of room</returns>
        /// <author>vuongvt</author>
        public List<Room> GetListRoomByTheater(int theaterId)
        {
            return _roomDao.GetListRoomByTheater(theaterId);
        }
    }
}